<template>
  <div class="HomeItemT3">
    <div class="box">
      <img :src="itemData.image.url" alt="">

      <div class="desc">
        <div class="location">{{ itemData.location }}</div>

        <div class="houseName">{{ itemData.houseName }}</div>

        <div class="summaryText">{{ itemData.summaryText }}</div>

        <div class="priceBox">
          <div class="left">
            <div class="finalPrice">{{ itemData.finalPrice }}元</div>
            <div class="productPrice">{{ itemData.productPrice }}元</div>
          </div>
          <div class="count">{{ itemData?.priceTipBadge?.text }}</div>
        </div>
      </div>

    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive } from 'vue'

defineProps({
  itemData: {
    type: Object,
    default: () => ({})
  }
})
</script>

<style scoped lang="less">
.box {
  width: 168px;
  height: 223px;

  img {
    width: 100%;
  }

  .desc {
    .location {
      font-size: 10px;
      color: #333;
      margin: 5px 0;
    }

    .houseName {
      font-size: 14px;
      font-weight: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .summaryText {
      font-size: 10px;
      color: #333;
      margin: 5px 0;
    }

    .priceBox {
      display: flex;
      justify-content: space-between;

      .left {
        display: flex;

        .finalPrice {
          color: var(--primary-color);
          margin-right: 4px;
        }

        .productPrice {
          text-decoration: line-through;
          color: #999;
        }

      }

      .count {
        flex: 1;
        text-align: center;
        background-color: pink;
        color: #fff;
        border-radius: 10px;
        margin-left: 5px;
      }
    }
  }
}
</style>
